package a.f.l.a;

import a.c.d;
import a.c.k;
import a.c.q;
import a.c.v;
import a.c.y;
import a.c.z;
import a.f.tb;
import a.i.db;

import java.util.*;

public class pb
{
  private static final String a = "y.layout.router.polyline.PathSearch.VISITED_NEIGHBORS";
  private static final double b = 1.0E-006D;
  private static final boolean c = false;
  private a.c.n d;
  int f;
  private qb g;
  private z h = new z();
  private z i = new z();
  private z j = new z();
  private z k = new z();
  private oc l = new oc();
  private a_ m;
  public static int n;
  
  z a()
  {
    return this.h;
  }
  
  public boolean a(sb paramsb)
  {
    return this.h.add(paramsb);
  }
  
  public boolean b(sb paramsb)
  {
    return this.h.remove(paramsb);
  }
  
  z b()
  {
    return this.i;
  }
  
  boolean a(sc paramsc)
  {
    return this.i.add(paramsc);
  }
  
  boolean c(sc paramsc)
  {
    return this.i.remove(paramsc);
  }
  
  private void a(h paramh, rb paramrb, byte paramByte)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    y localy = b().h();
    do
    {
      while (i1 == 0)
      {
        if (!localy.e()) {
          break;
        }
        ((sc)localy.j()).a(paramh, paramrb, paramByte);
        localy.f();
      }
    } while (bool);
  }
  
  z c()
  {
    return this.j;
  }
  
  public boolean a(p paramp)
  {
    return this.j.add(paramp);
  }
  
  public boolean b(p paramp)
  {
    return this.j.remove(paramp);
  }
  
  public void a(qb paramqb)
  {
    int i1 = sb.d;
    this.g = paramqb;
    this.d = db.b();
    this.f = 0;
    Iterator localIterator = this.h.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      sb localsb = (sb)localIterator.next();
      localsb.a(paramqb);
    } while (i1 == 0);
  }
  
  public void d()
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    z localz = a();
    Object localObject = localz.h();
    if (((y)localObject).e()) {}
    while (bool)
    {
      ((sb)((y)localObject).j()).c();
      ((y)localObject).f();
      if ((!bool) && (i1 != 0)) {
        break label71;
      }
      if (i1 == 0) {
        break;
      }
    }
    localz.clear();
    label71:
    localObject = this.g.a();
    this.i.clear();
    this.j.clear();
    this.k.clear();
    this.l.e();
    this.m = null;
    this.g = null;
    this.d = null;
    k localk = ((a.f.o)localObject).c("y.layout.router.polyline.PathSearch.VISITED_NEIGHBORS");
    if ((bool) || (localk != null))
    {
      a.f.d.a.pb localpb = (a.f.d.a.pb)localk.get(localObject);
      if ((bool) || (localpb != null)) {
        localpb.a(this.f);
      }
    }
  }
  
  void a(d paramd, ob paramob)
  {
    this.d.a(paramd, paramob);
  }
  
  public ob a(d paramd)
  {
    return (ob)this.d.get(paramd);
  }
  
  protected void a(rb paramrb)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    d locald = paramrb.d();
    int i1 = 0;
    o localo = paramrb.e();
    mc localmc = localo.f();
    double d1 = 0.0D;
    label92:
    do
    {
      do
      {
        do
        {
          for (;;)
          {
            if (i1 != 0) {
              break label596;
            }
            localObject1 = a().h();
            do
            {
              if (!((y)localObject1).e()) {
                break label92;
              }
              ((sb)((y)localObject1).j()).b(paramrb);
              ((y)localObject1).f();
              if ((!bool) && (i2 != 0)) {
                break;
              }
            } while (i2 == 0);
            localObject1 = c(paramrb);
            if (bool) {
              break label600;
            }
            Object localObject2 = ((z)localObject1).iterator();
            Object localObject3;
            do
            {
              if (!((Iterator)localObject2).hasNext()) {
                break;
              }
              localObject3 = (h)((Iterator)localObject2).next();
              ((h)localObject3).a(((h)localObject3).f() + a((h)localObject3));
              this.l.a((h)localObject3, ((h)localObject3).f());
              ((h)localObject3).a(true);
              a((h)localObject3, paramrb, (byte)1);
              if ((!bool) && (i2 != 0)) {
                break label425;
              }
            } while (i2 == 0);
            for (;;)
            {
              if (!bool) {
                if (!this.l.a())
                {
                  localObject2 = this.l.b();
                  a((h)localObject2, paramrb, (byte)0);
                  ((h)localObject2).a(false);
                  localObject3 = ((h)localObject2).a();
                  if (!bool)
                  {
                    if (paramrb.d((mb)localObject3)) {
                      if (bool) {
                        break label303;
                      }
                    }
                  }
                  else if (c((h)localObject2))
                  {
                    i1 = 1;
                    localObject4 = a((h)localObject2, paramrb.d());
                    a((ob)localObject4);
                    if (bool) {
                      break label303;
                    }
                    a(locald, (ob)localObject4);
                    if (i2 == 0) {
                      break;
                    }
                  }
                  Object localObject4 = this.g.c().t().c((mb)localObject3);
                  this.f += ((List)localObject4).size();
                  Iterator localIterator = ((List)localObject4).iterator();
                  do
                  {
                    do
                    {
                      if (!localIterator.hasNext()) {
                        break label390;
                      }
                      mb localmb = (mb)localIterator.next();
                      a((h)localObject2, localmb, paramrb);
                      if ((!bool) && (i2 != 0)) {
                        break;
                      }
                    } while (i2 == 0);
                  } while (bool);
                  if (d1 >= 1.0D) {
                    continue;
                  }
                  if ((bool) || (i2 != 0)) {
                    break label426;
                  }
                  if (!this.m.a()) {
                    continue;
                  }
                }
              }
            }
            if (i1 != 0) {
              break label569;
            }
            localObject2 = a().h();
            do
            {
              do
              {
                if (!((y)localObject2).e()) {
                  break;
                }
                ((sb)((y)localObject2).j()).c(paramrb);
                ((y)localObject2).f();
                if ((!bool) && (i2 != 0)) {
                  break label537;
                }
              } while (i2 == 0);
            } while (bool);
            if (this.l.a()) {
              break;
            }
            localObject2 = localmc.q();
            d1 = Math.min(1.0D, d1 + 0.25D);
            a((mc)localObject2, d1, paramrb);
            localo.a((mc)localObject2);
          }
          if ((!bool) && (localo.f() == localmc)) {
            break;
          }
          if (!bool)
          {
            localo.a(localmc);
            if (i2 == 0) {
              break;
            }
          }
        } while (localo.f() == localmc);
        localo.a(localmc);
      } while (bool);
    } while (i2 == 0);
    label303:
    label569:
    label596:
    label600:
    Object localObject1 = a().h();
    label390:
    label425:
    label426:
    if (((y)localObject1).e()) {}
    label537:
    while (bool)
    {
      ((sb)((y)localObject1).j()).d(paramrb);
      ((y)localObject1).f();
      if ((!bool) && (i2 != 0)) {
        return;
      }
      if (i2 == 0) {
        break;
      }
    }
    e();
  }
  
  protected void a(mc parammc, double paramDouble, rb paramrb)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    double d1 = 1.0D - Math.min(1.0D, Math.max(0.0D, paramDouble - 0.3D) * 2.0D);
    parammc.c((int)(parammc.c() * d1));
    double d2 = 1.0D - Math.min(1.0D, paramDouble * 2.0D);
    parammc.m((int)(parammc.m() * d2));
    parammc.p((int)(parammc.p() * d2));
    parammc.o((int)(parammc.o() * d2));
    double d3 = 1.0D - Math.min(1.0D, paramDouble * 3.5D);
    parammc.l((int)(parammc.l() * d3));
    parammc.i((int)(parammc.i() * d3));
    parammc.g((int)(parammc.g() * d3));
    parammc.h((int)(parammc.h() * d3));
    parammc.j((int)(parammc.j() * d3));
    parammc.k((int)(parammc.k() * d3));
    parammc.n((int)(parammc.n() * d3));
    double d4 = 1.0D - Math.min(1.0D, paramDouble * 10.0D);
    parammc.b((int)(parammc.b() * d4));
    parammc.d((int)(parammc.d() * d4));
    parammc.e((int)(parammc.e() * d4));
    parammc.f((int)(parammc.f() * d4));
    if ((bool) || (i1 != 0))
    {
      if (!bool) {}
      q.n = !q.n;
    }
    if (bool) {
      q.o = !q.o;
    }
  }
  
  private double a(h paramh)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    double d1 = 0.0D;
    y localy = a().h();
    do
    {
      if (!localy.e()) {
        break;
      }
      sb localsb = (sb)localy.j();
      if (!bool)
      {
        if (i1 != 0) {
          break label75;
        }
        d1 += localsb.a(paramh);
        localy.f();
      }
    } while (i1 == 0);
    label75:
    return d1;
  }
  
  private void e()
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    y localy = this.k.h();
    if (localy.e()) {}
    do
    {
      ((mb)localy.j()).a(null);
      localy.f();
      if ((!bool) && (i1 != 0)) {
        return;
      }
      if (i1 == 0) {
        break;
      }
      this.k.clear();
    } while (bool);
    this.l.e();
  }
  
  public void b(rb paramrb)
  {
    boolean bool = sb.e;
    int i2 = sb.d;
    int i1 = paramrb.c().k();
    if (i1 == 0) {
      return;
    }
    long l1 = System.currentTimeMillis() + paramrb.l();
    Object localObject1 = a().h();
    do
    {
      do
      {
        if (!((y)localObject1).e()) {
          break;
        }
        ((sb)((y)localObject1).j()).a(paramrb);
        if (bool) {
          break label241;
        }
        ((y)localObject1).f();
        if (i2 != 0) {
          break label239;
        }
      } while (i2 == 0);
    } while (bool);
    localObject1 = paramrb.c();
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      paramrb.a((d)localObject2);
      if (i2 != 0) {
        break label246;
      }
      if (paramrb.m() == 9223372036854775807L)
      {
        this.m = new d_();
        if (bool) {
          continue;
        }
        if (i2 == 0) {}
      }
      else
      {
        long l2 = System.currentTimeMillis();
        long l3 = (l1 - l2) / i1;
        long l4 = l2 + Math.max(l3, paramrb.m());
        this.m = new b_(l2, l4);
      }
      a(paramrb);
      i1--;
      ((a.c.m)localObject1).f();
    } while (i2 == 0);
    if (!bool)
    {
      localObject1 = a().h();
      label239:
      label241:
      label246:
      if (!((y)localObject1).e()) {
        break label275;
      }
    }
    label275:
    while (bool)
    {
      ((sb)((y)localObject1).j()).e(paramrb);
      ((y)localObject1).f();
      if (i2 == 0) {
        break;
      }
    }
    localObject1 = paramrb.k();
    Object localObject2 = paramrb.c();
    do
    {
      if (!((a.c.m)localObject2).e()) {
        break;
      }
      d locald = ((a.c.m)localObject2).a();
      ob localob = a(locald);
      if (bool) {
        break label426;
      }
      if (i2 != 0) {
        break label411;
      }
      if (localob != null)
      {
        ((lc)localObject1).a(locald, localob);
        n localn = ((lc)localObject1).a(locald);
        if (bool) {
          continue;
        }
        if (localn != null) {
          a(localn);
        }
      }
      ((a.c.m)localObject2).f();
    } while (i2 == 0);
    if (!bool) {
      localObject2 = a().h();
    }
    label411:
    label426:
    do
    {
      while (i2 == 0)
      {
        if (!((y)localObject2).e()) {
          break;
        }
        ((sb)((y)localObject2).j()).a((lc)localObject1);
        ((y)localObject2).f();
      }
    } while (bool);
  }
  
  private void a(n paramn)
  {
    int i1 = sb.d;
    Iterator localIterator = paramn.d().iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      m localm = (m)localIterator.next();
      localm.l().b().a(localm);
    } while (i1 == 0);
  }
  
  protected void a(ob paramob)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    do
    {
      y localy = a().h();
      while (i1 == 0)
      {
        if (!localy.e()) {
          break;
        }
        ((sb)localy.j()).a(paramob);
        localy.f();
      }
    } while (bool);
  }
  
  private z c(rb paramrb)
  {
    boolean bool = sb.e;
    int i4 = sb.d;
    z localz = new z();
    int i1 = 0;
    y localy = a().h();
    do
    {
      do
      {
        if (!localy.e()) {
          break;
        }
        sb localsb = (sb)localy.j();
        localsb.a(localz);
        localy.f();
      } while (i4 == 0);
    } while (bool);
    int i2 = 0;
    int i3 = paramrb.f();
    label247:
    label249:
    do
    {
      if (i2 >= i3) {
        break;
      }
      mb localmb1 = paramrb.a(i2);
      h localh1 = new h(localmb1);
      s locals = this.g.c().t();
      List localList = locals.c(localmb1);
      Iterator localIterator = localList.iterator();
      do
      {
        do
        {
          mb localmb2;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localmb2 = (mb)localIterator.next();
          } while (paramrb.b(localmb2));
          h localh2 = new h(localmb2);
          localh2.a(localh1);
          localh2.a(a(localh1, localmb2));
          localh2.a(a(localmb1, localmb2));
          localz.add(localh2);
          if ((bool) || (bool)) {
            break label249;
          }
          if (i4 != 0) {
            break label247;
          }
        } while (bool);
      } while (i4 == 0);
      i2++;
    } while (i4 == 0);
    return localz;
  }
  
  private List a(h paramh, mb parammb, tb paramtb, rb paramrb)
  {
    boolean bool2 = sb.e;
    int i8 = sb.d;
    ArrayList localArrayList1 = new ArrayList();
    jb localjb1 = a(paramh.a(), parammb);
    if (localjb1 == null) {
      throw new IllegalArgumentException("neighborCell has no common border with the PartitionCell of currentEntrance");
    }
    z localz = c();
    Object localObject2;
    Object localObject3;
    if ((bool2) || (!localz.isEmpty()))
    {
      int[] arrayOfInt = new int[localz.size()];
      int i1 = 0;
      v localv = localz.f();
      int i4;
      do
      {
        if (localv == null) {
          break;
        }
        p localp = (p)localv.c();
        i4 = localArrayList1.size();
        localp.a(paramh, parammb, localjb1, localArrayList1, paramrb);
        arrayOfInt[(i1++)] = (localArrayList1.size() - i4);
        localv = localv.a();
        if ((!bool2) && (i8 != 0)) {
          break label379;
        }
      } while (i8 == 0);
      if (bool2) {
        break label373;
      }
      int i2 = localArrayList1.size();
      if (bool2) {
        break label379;
      }
      if (i2 > 1)
      {
        int i3 = 0;
        i4 = 0;
        label330:
        label356:
        label363:
        do
        {
          if (i4 >= arrayOfInt.length) {
            break;
          }
          int i5 = i3 + arrayOfInt[i4];
          if (i8 != 0) {
            break label378;
          }
          int i6 = i3;
          do
          {
            do
            {
              if (i6 >= i5) {
                break;
              }
              localObject1 = (jb)localArrayList1.get(i6);
              if (bool2) {
                break label363;
              }
              if (i8 != 0) {
                break label356;
              }
              int i7 = i5;
              do
              {
                do
                {
                  if (i7 >= i2) {
                    break label330;
                  }
                  localObject2 = (jb)localArrayList1.get(i7);
                  if (i8 != 0) {
                    break;
                  }
                  if (!((jb)localObject1).f((jb)localObject2))
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!((jb)localObject2).f((jb)localObject1))
                    {
                      localObject3 = jb.a((jb)localObject1, (jb)localObject2);
                      if (bool2) {
                        continue;
                      }
                      if (localObject3 != null) {
                        localArrayList1.add(localObject3);
                      }
                    }
                  }
                  i7++;
                } while (i8 == 0);
                i6++;
              } while (bool2);
            } while (i8 == 0);
          } while (bool2);
          i3 += arrayOfInt[i4];
          i4++;
        } while (i8 == 0);
      }
    }
    if (!bool2)
    {
      label373:
      label378:
      localArrayList1.add(localjb1);
      label379:
      if (paramtb == paramh.d())
      {
        if (bool2) {
          break label404;
        }
        if (paramh.c() != null) {
          break label402;
        }
      }
    }
    return localArrayList1;
    label402:
    label404:
    double d1 = localjb1.f();
    boolean bool1 = localjb1.a();
    eb localeb1 = paramh.c().e();
    eb localeb2 = new eb(localeb1.a() - 0.1D, localeb1.b() + 0.1D);
    HashSet localHashSet = new HashSet();
    ArrayList localArrayList2 = new ArrayList();
    Object localObject1 = localArrayList1.iterator();
    label587:
    label735:
    do
    {
      do
      {
        do
        {
          do
          {
            do
            {
              do
              {
                jb localjb2;
                do
                {
                  if (!((Iterator)localObject1).hasNext()) {
                    break label790;
                  }
                  localjb2 = (jb)((Iterator)localObject1).next();
                  localObject2 = localjb2.e();
                  if (!bool2) {
                    if (localeb2.b((eb)localObject2) <= 0.0D)
                    {
                      if (bool2) {
                        break label587;
                      }
                      if (!((eb)localObject2).c(localeb1)) {
                        break;
                      }
                    }
                  }
                } while (!localHashSet.add(localObject2));
                if ((bool2) || (i8 != 0)) {
                  break label792;
                }
                localArrayList2.add(localjb2);
              } while ((!bool2) && (i8 == 0));
              if (!bool2)
              {
                if (((eb)localObject2).a() < localeb2.a())
                {
                  localObject3 = new eb(((eb)localObject2).a(), localeb2.a());
                  if (bool2) {
                    break label668;
                  }
                  if (localHashSet.add(localObject3))
                  {
                    localjb3 = new jb((eb)localObject3, d1, bool1);
                    localArrayList2.add(localjb3);
                  }
                }
                if (bool2) {
                  break label735;
                }
              }
              if (((eb)localObject2).b() > localeb2.b())
              {
                localObject3 = new eb(localeb2.b(), ((eb)localObject2).b());
                if (bool2) {
                  continue;
                }
                if (localHashSet.add(localObject3))
                {
                  localjb3 = new jb((eb)localObject3, d1, bool1);
                  localArrayList2.add(localjb3);
                }
              }
              localObject3 = eb.a(localeb1, (eb)localObject2);
            } while (localObject3 == null);
          } while (bool2);
        } while (!localHashSet.add(localObject3));
        jb localjb3 = new jb((eb)localObject3, d1, bool1);
        localArrayList2.add(localjb3);
      } while (bool2);
    } while (i8 == 0);
    label668:
    return localArrayList2;
  }
  
  private boolean c(h paramh)
  {
    int i1 = sb.d;
    y localy = a().h();
    do
    {
      if (!localy.e()) {
        break;
      }
      sb localsb = (sb)localy.j();
      if (i1 != 0) {
        break label59;
      }
      if (!localsb.c(paramh)) {
        return false;
      }
      localy.f();
    } while (i1 == 0);
    label59:
    return true;
  }
  
  protected void a(h paramh, mb parammb, rb paramrb)
  {
    boolean bool = sb.e;
    int i3 = sb.d;
    tb localtb = a(paramh, parammb);
    List localList1 = a(paramh, parammb, localtb, paramrb);
    h[] arrayOfh = new h[localList1.size()];
    HashSet localHashSet = new HashSet(localList1.size());
    z localz = new z();
    int i1 = 0;
    Object localObject1 = localList1.iterator();
    label171:
    label173:
    do
    {
      do
      {
        h localh1;
        do
        {
          do
          {
            if (!((Iterator)localObject1).hasNext()) {
              break;
            }
            localObject2 = (jb)((Iterator)localObject1).next();
          } while (!localHashSet.add(((jb)localObject2).e()));
          localh1 = c(paramh, parammb, (jb)localObject2);
          if (bool) {
            break label171;
          }
          if (localh1 == null) {
            break;
          }
          if (bool) {
            break label173;
          }
        } while (localh1.f() < paramh.f());
        arrayOfh[(i1++)] = localh1;
        localz.add(localObject2);
      } while (bool);
    } while (i3 == 0);
    localObject1 = paramrb.d();
    Object localObject2 = paramh.a();
    int i2 = (bool) || (paramh.j() != null) ? paramh.j().g() : 0;
    jb[] arrayOfjb = new jb[localz.size()];
    m[] arrayOfm = new m[localz.size()];
    double[] arrayOfDouble = new double[localz.size()];
    i1 = 0;
    Object localObject3 = localz.iterator();
    if (((Iterator)localObject3).hasNext()) {}
    jb localjb;
    while (bool)
    {
      localjb = (jb)((Iterator)localObject3).next();
      arrayOfjb[i1] = localjb;
      arrayOfm[i1] = new m((d)localObject1, (mb)localObject2, paramh.c(), localjb, paramh.d(), localtb, i2);
      h localh2 = arrayOfh[i1];
      if ((!bool) && (i3 != 0)) {
        break label390;
      }
      arrayOfDouble[i1] = ((bool) || (localh2 != null) ? localh2.f() - paramh.f() : 1.7976931348623157E+308D);
      i1++;
      if (i3 == 0) {
        break;
      }
    }
    label390:
    localObject3 = a(paramh, parammb, arrayOfjb, arrayOfm, paramrb, arrayOfDouble);
    i1 = 0;
    label400:
    label566:
    do
    {
      if (i1 >= arrayOfjb.length) {
        break;
      }
      localjb = arrayOfjb[i1];
      double d1 = paramh.f() + localObject3[i1];
      h localh3 = arrayOfh[i1];
      if (!bool) {
        if (localh3 != null)
        {
          if (!bool)
          {
            if (d1 >= localh3.f()) {
              break label790;
            }
            if (bool) {}
          }
          else if (localh3.c().g(localjb))
          {
            localh4 = localh3;
            localh4.c(null);
            if (bool) {
              break label566;
            }
            if (i3 == 0) {
              break label526;
            }
          }
          localh4 = new h(parammb);
          if (bool) {
            break label566;
          }
          if (i3 == 0) {
            break label526;
          }
        }
      }
      h localh4 = new h(parammb);
      localh4.a(paramh);
      localh4.a(localjb);
      localh4.a(d1);
      localh4.a(arrayOfm[i1]);
      double d2;
      double d3;
      if (!bool)
      {
        if (localh4.e())
        {
          d2 = a(localh4, paramrb);
          d3 = d1 + d2;
          this.l.b(localh4, d3);
          if (bool) {
            break label671;
          }
          a(localh4, paramrb, (byte)2);
          if (i3 == 0) {}
        }
        else
        {
          localh4.a(true);
        }
      }
      else
      {
        localh4.a(localtb);
        d2 = a(localh4, paramrb);
        d3 = d1 + d2;
        this.l.a(localh4, d3);
        a(localh4, paramh);
        a(localh4, paramrb, (byte)1);
      }
      List localList2 = a(paramh, parammb, localjb);
      if (!bool)
      {
        if (localList2 != null)
        {
          Iterator localIterator = localList2.iterator();
          do
          {
            h localh5;
            do
            {
              do
              {
                do
                {
                  if (!localIterator.hasNext()) {
                    break;
                  }
                  localh5 = (h)localIterator.next();
                } while (localh5 == localh4);
                if (bool) {
                  break label400;
                }
                if (i3 != 0) {
                  break;
                }
              } while (!this.l.a(localh5));
              if (bool) {
                break label782;
              }
            } while (localh5.f() <= d1);
            this.l.b(localh5);
            localh5.a(false);
            if (bool) {
              break label795;
            }
          } while (i3 == 0);
        }
        i1++;
      }
    } while (i3 == 0);
    label526:
    label671:
    return;
  }
  
  private void a(h paramh1, h paramh2)
  {
    boolean bool = sb.e;
    mb localmb1 = paramh2.a();
    HashMap localHashMap = localmb1.d();
    if ((bool) || (localHashMap == null))
    {
      localHashMap = new HashMap();
      this.k.add(localmb1);
      localmb1.a(localHashMap);
    }
    mb localmb2 = paramh1.a();
    ArrayList localArrayList = (ArrayList)localHashMap.get(localmb2);
    if (!bool) {
      if (localArrayList == null)
      {
        localArrayList = new ArrayList();
        localHashMap.put(localmb2, localArrayList);
      }
    }
    localArrayList.add(paramh1);
  }
  
  private List a(h paramh, mb parammb, jb paramjb)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    HashMap localHashMap = paramh.a().d();
    if (!bool) {
      if (localHashMap == null) {
        return null;
      }
    }
    ArrayList localArrayList1 = (ArrayList)localHashMap.get(parammb);
    if (!bool) {
      if (localArrayList1 == null) {
        return null;
      }
    }
    ArrayList localArrayList2 = new ArrayList();
    Iterator localIterator = localArrayList1.iterator();
    do
    {
      do
      {
        h localh;
        do
        {
          if (!localIterator.hasNext()) {
            break;
          }
          localh = (h)localIterator.next();
        } while (!localh.c().f(paramjb));
        if ((bool) || (i1 != 0)) {
          break label134;
        }
        localArrayList2.add(localh);
      } while (bool);
    } while (i1 == 0);
    label134:
    return localArrayList2;
  }
  
  private h c(h paramh, mb parammb, jb paramjb)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    List localList = a(paramh, parammb, paramjb);
    if (localList == null) {
      return null;
    }
    Object localObject = null;
    Iterator localIterator = localList.iterator();
    label95:
    do
    {
      h localh;
      do
      {
        if (!localIterator.hasNext()) {
          break label98;
        }
        localh = (h)localIterator.next();
        if (i1 != 0) {
          break label100;
        }
        if (localObject == null) {
          break;
        }
        if (bool) {
          break label95;
        }
      } while (localObject.f() <= localh.f());
      localObject = localh;
    } while (i1 == 0);
    label98:
    label100:
    return localObject;
  }
  
  protected double[] a(h paramh, mb parammb, jb[] paramArrayOfjb, m[] paramArrayOfm, rb paramrb, double[] paramArrayOfDouble)
  {
    boolean bool = sb.e;
    int i3 = sb.d;
    double[] arrayOfDouble1 = new double[paramArrayOfjb.length];
    double[] arrayOfDouble2 = new double[paramArrayOfDouble.length];
    System.arraycopy(paramArrayOfDouble, 0, arrayOfDouble2, 0, paramArrayOfDouble.length);
    y localy = a().h();
    label189:
    label194:
    label204:
    do
    {
      if (!localy.e()) {
        break;
      }
      sb localsb = (sb)localy.j();
      if (i3 != 0) {
        break label224;
      }
      double[] arrayOfDouble3 = localsb.a(paramh, parammb, paramArrayOfjb, paramArrayOfm, arrayOfDouble2);
      int i1 = 1;
      int i2 = 0;
      if (i2 < arrayOfDouble3.length) {
        arrayOfDouble1[i2] += arrayOfDouble3[i2];
      }
      while (bool)
      {
        if (i3 != 0) {
          break label204;
        }
        if (arrayOfDouble2[i2] == 1.7976931348623157E+308D)
        {
          i1 = 0;
          if (bool) {
            break label194;
          }
          if (i3 == 0) {}
        }
        else
        {
          arrayOfDouble2[i2] -= arrayOfDouble3[i2];
          if (!bool) {
            if (arrayOfDouble2[i2] <= 0.0D)
            {
              arrayOfDouble2[i2] = 0.0D;
              if (bool) {
                break label194;
              }
              if (i3 == 0) {
                break label189;
              }
            }
          }
          i1 = 0;
        }
        i2++;
        if (i3 == 0) {
          break;
        }
      }
      if (i1 != 0) {
        return arrayOfDouble1;
      }
      localy.f();
    } while (i3 == 0);
    label224:
    return arrayOfDouble1;
  }
  
  protected double a(h paramh, rb paramrb)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    double d1 = 0.0D;
    sb localsb = null;
    y localy = a().h();
    if (localy.e()) {}
    while (bool)
    {
      localsb = (sb)localy.j();
      if (bool) {
        break label88;
      }
      d1 += localsb.b(paramh);
      localy.f();
      if (i1 != 0) {
        return d1;
      }
      if (i1 == 0) {
        break;
      }
    }
    if (localsb != null) {}
    label88:
    return d1;
  }
  
  static jb a(mb parammb1, mb parammb2)
  {
    double d1 = Math.max(parammb2.i(), parammb1.i());
    double d2 = Math.min(parammb2.k(), parammb1.k());
    double d3 = Math.max(parammb2.j(), parammb1.j());
    double d4 = Math.min(parammb2.l(), parammb1.l());
    return new jb(d1, d3, d2, d4);
  }
  
  static tb a(h paramh, mb parammb)
  {
    mb localmb = paramh.a();
    double d1 = Math.max(localmb.i(), parammb.i());
    double d2 = Math.min(localmb.k(), parammb.k());
    double d3 = Math.max(localmb.j(), parammb.j());
    if (!sb.e) {
      if (Math.abs(d1 - d2) > 1.0E-006D)
      {
        if (Math.abs(d3 - parammb.j()) < 1.0E-006D) {
          return tb.c;
        }
        return tb.a;
      }
    }
    if (Math.abs(d1 - parammb.i()) < 1.0E-006D) {
      return tb.b;
    }
    return tb.d;
  }
  
  static ob a(h paramh, d paramd)
  {
    boolean bool = sb.e;
    int i1 = sb.d;
    if (paramh == null) {
      return null;
    }
    z localz = new z();
    ob localob;
    do
    {
      for (h localh = paramh; i1 == 0; localh = localh.b())
      {
        if (localh == null) {
          break;
        }
        localz.a(localh);
      }
      localob = new ob(paramd, localz, paramh.f());
    } while (bool);
    return localob;
  }
  
  List g()
  {
    return null;
  }
  
  private void a(h paramh, mb parammb, List paramList1, List paramList2, rb paramrb, jb paramjb) {}
  
  List h()
  {
    return null;
  }
  
  static class d_
    extends pb.a_
  {
    protected boolean a(long paramLong)
    {
      return false;
    }
  }
  
  static class c_
    extends pb.a_
  {
    private final long b;
    private long c;
    private int d = 0;
    
    c_(long paramLong)
    {
      this.b = (paramLong * 1L);
      this.c = this.b;
    }
    
    protected boolean a(long paramLong)
    {
      if (!sb.e) {
        if (paramLong == this.c)
        {
          this.d += 1;
          this.c += this.b * this.d;
          return true;
        }
      }
      return false;
    }
  }
  
  static class b_
    extends pb.a_
  {
    private int b = 10;
    private long c = 50L;
    private long d = this.c;
    private long e;
    private long f;
    private long g;
    private final long h;
    private long j;
    
    b_(long paramLong1, long paramLong2)
    {
      this.e = (this.f = paramLong1);
      this.g = paramLong2;
      this.h = (paramLong2 - paramLong1);
    }
    
    protected boolean a(long paramLong)
    {
      boolean bool = sb.e;
      if (!bool) {
        if (paramLong == this.d)
        {
          this.j = paramLong;
          long l1 = System.currentTimeMillis();
          long l2 = l1 - this.e;
          long l3 = Math.max(this.b, (this.g - l1) / 2L);
          if (!bool)
          {
            if (l2 == 0L) {
              this.c *= l3;
            }
          }
          else
          {
            if (bool) {
              break label133;
            }
            if (sb.d == 0) {
              break label112;
            }
          }
          this.c = Math.max(1L, (l3 / l2 * this.c));
          label112:
          this.d = (paramLong + this.c);
          this.e = l1;
          label133:
          if (!bool) {
            if (l1 >= this.g)
            {
              this.g = (l1 + this.h);
              return true;
            }
          }
          return false;
        }
      }
      return false;
    }
    
    public long b()
    {
      return System.currentTimeMillis() - this.f;
    }
  }
  
  static abstract class a_
  {
    private long a = 0L;
    
    public boolean a()
    {
      this.a += 1L;
      return a(this.a);
    }
    
    protected abstract boolean a(long paramLong);
    
    public long c()
    {
      return this.a;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.a.pb

 * JD-Core Version:    0.7.0.1

 */